/*
Copyright (C) 2021-2025 Casa Xu (also Zhiyan Xu) from HIT

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

/*
 * LOS_FATFS.h
 *
 *  Created on: 2022年7月28日
 *      Author: 64435
 */

#ifndef OS_LAYER_INC_LOS_FATFS_H_
#define OS_LAYER_INC_LOS_FATFS_H_


#include "ff.h"

extern uint8_t readbuf[128];


uint8_t LOS_FATFS_Init();
uint8_t LOS_FATFS_WriteEOF(uint8_t* path, uint8_t* data, uint32_t length);
uint8_t LOS_FATFS_Write(uint8_t* path, uint8_t* data, uint32_t length, uint32_t offset, uint32_t* size);
uint8_t LOS_FAFTS_DeleteFile(uint8_t* path);
uint8_t LOS_FATFS_ScanDir(uint8_t* path);
uint8_t LOS_FATFS_ClearFile(uint8_t* path);
uint32_t LOS_FATFS_Size(uint8_t* filename);

uint8_t LOS_FATFS_TestWrite(uint8_t fn);
uint8_t LOS_FATFS_TestRead(uint8_t fn);
uint8_t LOS_FATFS_TestScan(uint8_t* path);



#endif /* OS_LAYER_INC_LOS_FATFS_H_ */
